import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import LightView from "@/views/LightView";
import ActualView from "@/views/ActualView";
import FreeView from "@/views/FreeView";
import SeckillView from "@/views/SeckillView";
import ActualCourseDetail from "@/views/ActualCourseDetail";
import SearchCourseView from "@/views/SearchCourseView";
import PaySuccessView from "@/views/PaySuccessView";


Vue.use(VueRouter);

const routes = [
    {
        path: '/',
        name: 'home',
        component: HomeView
    }, {
        path: '/free',
        name: 'free',
        component: FreeView
    }, {
        path: '/actual',
        name: 'actual',
        component: ActualView
    }, {
        path: '/light',
        name: 'light',
        component: LightView
    }, {
        path: '/seckill',
        name: 'seckill',
        component: SeckillView
    }, {
        path: '/actual/detail/:pk',
        name: 'detail',
        component: ActualCourseDetail
    },
    {
        path: '/course/search',
        name: 'search',
        component: SearchCourseView
    },
    {
        path: '/pay/success',
        name: 'success',
        component: PaySuccessView
    }
];

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
});

export default router
